<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="user/css/UserCenter.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<script src="user/js/jquery-1.7.1.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script src="user/js/UserWin.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<title>100课堂英语学习会员中心</title>
</head>
<body>
<?include('userTop.php')?>
<div class="CenterAuto">
	<?
    include('userLeft.php')
    ?>
   <form action="user_buy.htm" method="post" name="Acrt">
    <div class="CenterRight Color666">
	<?
    include('userMenu.php')
    ?>
    <div class="PublicUserListTitle mt10"><em>热门课程</em>(温馨提示：热门课程是固定教材和固定次数，期间可以申请更换一次教材，在有效期内使用，每天可自由预约多节课。)</div>
     <table width="770" border="0" cellspacing="2">
        <tr class="ColorFFF">
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">热门课程</td>
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">课时/有效期</td>
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">折扣价</td>
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">每天约课数</td>
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">返劵</td>
          <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">操作</td>
        </tr>
            <?
              foreach($product['active_class'][PRODUCT_UNIT_2] as $k=>$v){
        ?>
            <tr>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['target_course_name']?></td>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['name']?>（<?=$v['period_validity']?>天有效）</td>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?if($v['discount']>0){?><del>￥<?=number_format($v['price'],2)?></del><?}?>￥<?=number_format($v['price']-$v['discount'],2)?></td>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">无限制</td>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">￥<?=$returnTicketPair[$v['return_ticket']]?></td>
              <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">
                <span class="TacanChox TanCh1" date="<?=$v['price']-$v['discount']?>"><input name="id[]" type="checkbox" value="<?=$v['id']?>"  /></span>
              </td>
            </tr>
              <?}?>
          </table>   
   
   <div class="PublicUserListTitle mt10"><em>次卡套餐</em>(温馨提示：次卡套餐是固定次数，在有效期内使用完即可，每天可以自由预约多节课。)</div>
   <table width="770" border="0" cellspacing="2">
      <tr class="ColorFFF">
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">次卡套餐</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">总价</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">单价</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">每天约课数</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">返劵</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">操作</td>
      </tr>
          <?
            foreach($product[PRODUCT_TYPE_2][PRODUCT_UNIT_2] as $k=>$v){
		  ?>
          <tr>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['name']?>（<?=$v['period_validity']?>天有效）</td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?if($v['discount']>0){?><del>￥<?=number_format($v['price'],2)?></del><?}?>￥<?=number_format($v['price']-$v['discount'],2)?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">￥<?=$v['unit_price']?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">无限制</td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">￥<?=$returnTicketPair[$v['return_ticket']]?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">
            	<span class="TacanChox TanCh1" date="<?=$v['price']-$v['discount']?>"><input name="id[]" type="checkbox" value="<?=$v['id']?>"  /></span>
            </td>
          </tr>
            <?}?>
        </table>
	        <div class="PublicUserListTitle mt10"><em>包月套餐</em>(温馨提示：包月套餐是每个月有固定休息日期，当天上课时间可以自由调配，但是每天只可预约一节课。)</div>
   <table width="770" border="0" cellspacing="2">
          <tr class="ColorFFF">
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">包月套餐</td>
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">总价</td>
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">单价</td>
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">每天约课数</td>
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">返劵</td>
            <td height="30" align="center" valign="middle" bgcolor="#0D6DB7">操作</td>
          </tr>
           <?foreach($product[PRODUCT_TYPE_1][PRODUCT_UNIT_2] as $k=>$v){?>
          <tr>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['name']?>(<?=$v['period_validity']?>天有效)</td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7"><?if($v['discount']>0){?><del>￥<?=number_format($v['price'],2)?></del><?}?>&nbsp;￥<?=number_format($v['price']-$v['discount'],2)?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">￥<?=$v['unit_price']?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">1节</td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">￥<?=$returnTicketPair[$v['return_ticket']]?></td>
            <td height="30" align="center" valign="middle" bgcolor="#E7E7E7">
              <span class="TacanChox TanCh1" date="<?=$v['price']-$v['discount']?>"><input name="id[]" type="checkbox" value="<?=$v['id']?>" /></span>
            </td>
          </tr>
            <?}?>
        </table>
         <div class="PublicUserListTitle mt10"><em>当前总金额：</em><span class="SumUser">0</span><span class="SumUser21">元</span></div>
        <input type="submit" class="PublicPrice" value="点击购买"  id="next_buy"/>
    </div>
     </form>
    <div class="clearc"></div>
</div>
<script type="text/javascript">
$(document).ready(function(){$('.TacanChox').click(function(){
var se = $(this).attr('class');
var we = "TacanChox TanCh1";
var Sun = parseInt($('.SumUser').text());
var usn =parseInt($(this).attr('date'));
var sundd;
if(se==we){$(this).attr('class','TacanChox TanCh2');$(this).find('input').attr("checked",'true'); sundd=Sun+usn;}else{$(this).attr('class','TacanChox TanCh1');$(this).find('input').removeAttr("checked"); sundd=Sun-usn;}$('.SumUser').text(sundd);})});

$("#next_buy").click(function(){
	var checked_flg = false;
	$("input[name='id[]']").each(
		function(){   
			var checked = $(this).attr("checked");
			if(checked=='checked'){
				checked_flg=true;
			}	
		}
	)
	
	if(checked_flg==false){
		alert('购物车内无商品,请加入商品');
		return false;
	}
	document.Acrt.submit();
})
</script>
<?include('userFoot.php')?>	 
</body>
</html>